package cn.wolfcode.query;

import cn.wolfcode.util.DateUtil;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter
@Setter
public class CustomerReportQueryObject extends QueryObject {
	private String groupType = "e.name";
	private String keyword;

	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date beginDate;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date endDate;

	public Date getEndDate() { // 获取结束时间当天最晚的时候
		return DateUtil.getEndDate(endDate);
	}

}
